#!/usr/bin/env python

# TODO: Work in progress

def color(c):
	pass

tags={
	'b': Tag('<b>', Content(), '</b>'),
	'u': Tag('<u>', Content(), '</u>'),
	'i': Tag('<i>', Content(), '</i>'),
	'url=': Tag(WithParams('<a href="%s">', Attribute()), Content(), '</a>'),
	'url': Tag(WithParams('<a href="%s">', Content()), Content(), '</a>'),
	'img': Tag(WithParams('<img href="%s">', Attribute()), Content()) ),
	'code': Tag(WithParams('<code mime-type="%s">', Attribute()), Content(), '</code>') ),
	'color': Tag(WithParams('<span style="color: %s;>', Attribute(process=color)), Content(), '</span>') ),
	'quote': Tag(WithParams('<blockquote>', Content(), '</blockquote>'), # [quote=jonathan]...[/quote]
}

def parse(source_string):
	return html_string
